<!DOCTYPE HTML>
<html>
	<script>
		window.onload = function() {
			function isType(type) {
				return function(obj) {
					return Object.prototype.toString.call(obj) === "[object " + type + "]"
				}
			}

			var isObject = isType("Object")
			var isString = isType("String")
			var isArray = Array.isArray || isType("Array")
			var isFunction = isType("Function")

			console.log((function() {
				var num = 99;
				//arguments.callee.caller
				return num.toPrecision(1);
			})(this));
			var a = 'afaf';
			console.log(isString(a));
			var div = document.createElement("footer");
			div.setAttribute('id', 't');
			document.getElementById("test").appendChild(div);
			console.log(getComputedStyle(div,false)['width']);
			document.getElementById("t").innerHTML = '4';
		}
	</script>
	<body>
		<div id="test" >
			<p>
				1
			</p>
			<p>
				2
			</p>
			<p>
				3
			</p>
		</div>
	</body>
</html>